<!--%import("./filter/change_language.xml")-->
<!--%import("./filter/change_layout.xml")-->
<!--%import("filter/update_index_mid.xml")-->

<!--#include("_header.html")-->

<h4 class="xeAdmin">{$lang->cafe_info}</h4>
<form method="post" action="{Context::getRequestUri()}" enctype="multipart/form-data" class="form">
    <!--@if(isSiteID($site_module_info->domain))-->
    <input type="hidden" name="vid" value="{$site_module_info->domain}"/>
    <!--@end-->
    <input type="hidden" name="site_srl" value="{$homepage_info->site_srl}" />
    <input type="hidden" name="module" value="homepage" />
    <input type="hidden" name="act" value="procHomepageInsertCafeBanner" />
    <div class="table">
	<table cellspacing="0" class="rowTable">
    <tr>
        <th><div>{$lang->cafe_title}</div></th>
        <td class="wide"><input type="text" name="cafe_title" value="{htmlspecialchars($homepage_info->title)}" class="inputTypeText" /></td>
    </tr>
    <tr>
        <th><div>{$lang->cafe_description}</div></th>
        <td class="wide"><textarea name="cafe_description" class="inputTypeTextArea" style="width:90%;">{htmlspecialchars($homepage_info->cafe_description)}</textarea></td>
    </tr>
    <tr>
        <th><div>{$lang->cafe_banner}</div></th>
        <td class="wide">
            <!--@if($homepage_info->cafe_banner)-->
            <img src="{$homepage_info->cafe_banner}" alt="cafe banner" style="display:block;margin-bottom:10px;"/>
            <!--@end-->
            <input type="file" name="cafe_banner" value="" class="inputTypeText" />
        </td>
    </tr>
    </table>
	</div>
    <div class="btnArea">
            <span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
	</div>
</form>

<h4 class="xeAdmin">{$lang->cmd_select_index}</h4>
<form method="post" action="./" onsubmit="return procFilter(this,update_index_mid)" class="midDefault">
	<div class="table">
    <table cellspacing="0" class="rowTable">
    <tr>
        <td>
            <select name="index_mid">
                <!--@foreach($mid_list as $no => $val)-->
                <option value="{$val->module_srl}" <!--@if($val->module_srl==$homepage_info->module_srl)-->selected="selected"<!--@end-->>{$val->browser_title} ({$val->mid})</option>
                <!--@end-->
            </select>
        </td>
    </tr>
    </table>
	</div>
    <div class="btnArea">
            <span class="btn"><input type="submit" value="{$lang->cmd_select}" /></span>
	</div>
</form>


<h4 class="xeAdmin">{$lang->default_language}</h4>
<p class="summary">{$lang->About_default_language}</p>
<form action="./" method="get" onsubmit="return procFilter(this, change_language);">
	<div class="table">
    <table cellspacing="0" class="rowTable">
    <tr>
        <td>
            <select name="language">
            <!--@foreach($lang_supported as $key => $val)-->
                <option value="{$key}" <!--@if($key==$site_module_info->default_language)-->selected="selected"<!--@end-->>{$val}</option>
            <!--@endforeach-->
            </select>
        </td>
    </tr>
    </table>
	</div>
	<div class="btnArea">
            <span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
	</div>
</form>

<form action="./" method="post" onsubmit="return procFilter(this, change_layout);" class="gap1 form">
    <h4 class="xeAdmin">{$lang->layout}</h4>
	<div class="table">
    <table cellspacing="0" class="rowTable">
    <!--@if($homepage_config->enable_change_layout == 'Y')-->
    <tr>
        <th><div>{$lang->layout}</div></th>
        <td colspan="2" class="text">
            <select name="layout">
                <option value="faceoff">faceoff</option>

                <optgroup label="{$lang->downloaded_list}">
                <!--@foreach($layout_list as $key => $val)-->
                <option value="{$val->layout}" <!--@if($selected_layout->layout == $val->layout)-->selected="selected"<!--@end-->> <!--@if($val->title)-->{$val->title} ({$val->layout})<!--@else-->{$val->layout}<!--@end--></option>
                <!--@end-->
                </optgroup>

            </select>
            <span class="button black"><input type="submit" value="{$lang->cmd_change_layout}" /></span>
        </td>
    </tr>
    <!--@end-->
    <tr>
        <th scope="row"><div>{$lang->path}</div></th>
        <td colspan="2" class="text">{$selected_layout->path}</td>
    </tr>
    <!--@if(count($selected_layout->author))-->
    <tr class="row2">  
        <th scope="row"><div>{$lang->author}</div></th>
        <td colspan="2" class="text">
            <!--@foreach($selected_layout->author as $k => $v)-->
            <a href="{$v->homepage}" onclick="window.open(this.href);return false;">{$v->name}</a>
            <!--@end-->
        </td>
    </tr>
    <!--@end-->

    <!--@if($selected_layout->description)-->
    <tr class="row2">  
        <th scope="row"><div>{$lang->description}</div></th>
        <td colspan="2" class="text">{nl2br(trim($selected_layout->description))}</td>
    </tr>
    <!--@end-->
</form>

<form id="fo_layout" action="./" method="post" enctype="multipart/form-data" target="hidden_iframe">
<input type="hidden" name="module" value="homepage" />
<input type="hidden" name="vid" value="{$vid}" />
<input type="hidden" name="act" value="procHomepageLayoutUpdate" />
<input type="hidden" name="layout_srl" value="{$selected_layout->layout_srl}" />
<input type="hidden" name="title" value="{htmlspecialchars($homepage_info->title)}" />
<input type="hidden" name="apply_layout" value="Y" />

<!--@foreach($selected_layout->menu as $menu_name => $menu_info)-->
<input type="hidden" name="{$menu_name}" value="{$menu_info->menu_srl}" />
<!--@end-->

    <tr class="row2">
        <th scope="row"><div>{$lang->header_script}</div></th>
        <td colspan="2" class="text">
            <textarea name="header_script" class="inputTypeTextArea w400">{htmlspecialchars($selected_layout->header_script)}</textarea>
            <p>{$lang->about_header_script}</p>
        </td>
    </tr>
    <!--@foreach($selected_layout->extra_var as $name => $var)-->
        {@ $_rows[$var->group]++ }
    <!--@end-->

    <!--@foreach($selected_layout->extra_var as $name => $var)-->
        <!--@if($var->group && ((!$_group) || $_group != $var->group))-->
        {@$_group_idx = 0;}
        {@$_group = $var->group}
    <tr>
        <th rowspan="{$_rows[$var->group]+1}"><div>{$_group}</div></th>
    </tr>
        <!--@end-->

        <!--@if($_group_idx>0)-->
    <tr>
        <!--@end-->
        <td class="nowrap"><div>{$var->title}</div></td>
        <td <!--@if(!$var->group)-->colspan="2"<!--@end--> class="text">
        <!--@if($var->type == "text")-->
            <input type="text" name="{$name}" value="{htmlspecialchars($var->value)}"  id="vars_{$name}"class="inputTypeText w400"/>
            <a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','vars_'.$name)}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>

        <!--@elseif($var->type == "textarea")-->
            <textarea name="{$name}" class="inputTypeTextArea w400" id="vars_{$name}">{htmlspecialchars($var->value)}</textarea>
            <a href="{getUrl('','module','module','act','dispModuleAdminLangcode','target','vars_'.$name)}" onclick="popopen(this.href);return false;" class="buttonSet buttonSetting"><span>{$lang->cmd_find_langcode}</span></a>

        <!--@elseif($var->type=="image")-->

          <!--@if($var->value)-->
          <div>
              <img src="../../../{$var->value}" alt="image" /><br />
              <input type="checkbox" name="del_{$name}" value="Y" id="del_{$name}" class="checkbox" />
              <label for="del_{$name}">{$lang->cmd_delete}</label>
          </div>
          <!--@end-->

          <input type="file" name="{$name}" value="" />

        <!--@elseif($var->type == "select")-->
            <select name="{$name}">
                <!--@foreach($var->options as $key => $val)-->
                <option value="{$key}" <!--@if($key==$var->value)-->selected="selected"<!--@end-->>{$val->val}</option>
                <!--@end-->
            </select>
        <!--@end-->
            <p>{$var->description}</p>
        </td>
    </tr>
    <!--@end-->

    <!--@if($var->group)-->
    <!--@end-->
    </table>
	</div>
	<div class="btnArea">
            <span class="button strong black"><input type="submit" value="{$lang->cmd_save}" /></span>
	</div>
</form>

<iframe name="hidden_iframe" frameborder="0" style="display:none"></iframe>

<!--#include("_footer.html")-->
